# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=miniupnpc
pkgver=2.2.7
pkgrel=0
pkgdesc="Library and tool to control NAT in UPnP-enabled routers"
url="http://miniupnp.free.fr"
arch="all"
license="BSD-3-Clause"
makedepends="bsd-compat-headers py3-setuptools python3-dev"
subpackages="$pkgname-dev py3-$pkgname:_py3 $pkgname-doc"
source="http://miniupnp.free.fr/files/miniupnpc-$pkgver.tar.gz"

build() {
	make
	python3 setup.py build
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
	python3 setup.py install --skip-build --root="$pkgdir"
}

_py3() {
	pkgdesc="Python bindings for miniupnpc"

	amove usr/lib/python3*
}

sha512sums="
d24e653c2f7bfed4485342c5ec8d18b4dd4c3430975b5fae392d3534f38bb3fb59e6638e76d57847f49045e22f3afd6cac128d7d9d10ef05bd6ad24ef38303b6  miniupnpc-2.2.7.tar.gz
"
